﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserMaster.Master" AutoEventWireup="true" CodeBehind="msg.aspx.cs" Inherits="QunYing.Web.market.msg" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function verify() {
            var txtMsg = $.trim($("#<%=this.txtMsg.ClientID %>").val());

            if (txtMsg.length == 0) {
                alert("请输入留言内容!");
                $("#<%=this.txtMsg.ClientID %>").focus();
                return false;
            }
            return true;
        }
        function cancel() {
            $("#<%=this.txtMsg.ClientID %>").val("");
            $("#<%=this.txtMsg.ClientID %>").focus();
            return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
            <div id="main">
                
      <div class="index_box">
        <h2><span><strong>历史</strong>留言</span></h2>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                    OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="2" ShowHeader="False"
                    Width="100%" BorderWidth="0"   PagerStyle-CssClass="cssPager">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div>
                                    <div style="margin: 10px;">
                                        <%# Eval("留言内容") %>
                                    </div>
                                    <div style="text-align: right; margin-right: 20px; margin-bottom: 10px;">
                                        --<%# Eval("留言时间") %></div>                                        
                                    <div style=" border: 1px solid green; margin: 20px;display:<%# Eval("回复时间").ToString()==""?"none":"block" %>">
                                        <div style="margin: 10px;">
                                            管理员于<%# Eval("回复时间") %>回复:</div>
                                        <div style="margin: 10px;">
                                            <%# Eval("回复内容") %></div>
                                    </div>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
            <div style="clear: both;">
                <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                    RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True">咨询</asp:ListItem>
                    <asp:ListItem>建议</asp:ListItem>
                    <asp:ListItem>投诉</asp:ListItem>
                    <asp:ListItem>好评</asp:ListItem>
                </asp:RadioButtonList>
                </div>
            <div class="index_box">
        <h2><span><strong>留言</strong>内容</span></h2>
                <asp:TextBox ID="txtMsg" runat="server" Height="100px" TextMode="MultiLine" Width="99%"></asp:TextBox>
                <br />
       <br/>
                <asp:Button ID="btnSubmit" runat="server" Text="留言" OnClick="btnSubmit_Click" OnClientClick="return verify();" />
                &nbsp;&nbsp;
                <asp:Button ID="btnClear" runat="server" Text="清空" OnClientClick="return cancel();" />
                <br />
           
            </div>
            </div>
            </ContentTemplate>
                </asp:UpdatePanel>
</asp:Content>
